<?php $this->_extends('_layouts/main_layout'); ?>
<?php $this->_block('title'); ?>
	Advertisers
<?php $this->_endblock(); ?>

<?php $this->_block('contents'); ?>

<div id="content" class="box">
	<h1>Advertisers</h1>
	<div id="menu" class="box">
		<ul class="box">
			<li><a href="<?php echo url('advertiser/add');?>"><span>Add</span></a></li>
		</ul>
	</div>
		<?php if (isset($infos)) 
				{
					foreach ($infos as $info)
					{
		?>
				<p class="msg info"><?php echo $info;?></p>
		<?php		}
				}
		?>
	<fieldset>
		<legend>Advertisers</legend>
		<table class="full-size">
			<thead>
				<tr>
					<th>Id</th>
					<th>Name</th>
					<th></th>
				</tr>
			</thead>
			<tbody>
				<?php 
					if (count($advertisers) > 0):
						foreach($advertisers as $advertiser): 
				?>
					<tr>
						<td><?php echo $advertiser['id']; ?></td>
						<td><?php echo $advertiser['name']; ?></td>
						<td>
							<a href="<?php echo url('advertiser/edit', array('id'=>$advertiser['id']));?>">Edit</a>
							<a href="<?php echo url('advertiser/delete', array('id'=>$advertiser['id']));?>">Delete</a>
						</td>
					</tr>
				<?php 
						endforeach; 
					endif;
				?>
			</tbody>
		</table>
	</fieldset>
</div>

<?php $this->_endblock(); ?>